//
//  MLWxxEventTableViewCell.m
//  KITCHEN_STORIES
//
//  Created by dllo on 16/6/14.
//  Copyright © 2016年 MLW. All rights reserved.
//

#import "MLWxxEventTableViewCell.h"

@implementation MLWxxEventTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

//初始化:
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        self.leftImageView = [[UIImageView alloc] initWithFrame:CGRectMake(10, 10, ScreenWidth / 3.5, ScreenHeight / 7)];
        
        self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.leftImageView.frame.origin.x + self.leftImageView.frame.size.width + 5, self.leftImageView.frame.origin.y, ScreenWidth - (self.leftImageView.frame.origin.x + self.leftImageView.frame.size.width + 5), self.leftImageView.frame.size.height / 4)];
        self.contentLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.titleLabel.frame.origin.x, self.titleLabel.frame.origin.y + self.titleLabel.frame.size.height + 5, self.titleLabel.frame.size.width, self.leftImageView.frame.size.height - self.titleLabel.frame.origin.y - self.titleLabel.frame.size.height - 10)];
        
        self.contentLabel.font = [UIFont systemFontOfSize:14];
        //自动换行:
        self.contentLabel.numberOfLines = 0;
        
        [self.contentView addSubview:self.leftImageView];
        [self.contentView addSubview:self.titleLabel];
        [self.contentView addSubview:self.contentLabel];
        
        [self.leftImageView release];
        [self.titleLabel release];
        [self.contentLabel release];
        
        
    }
    
    
    
    return self;
}



- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
